package com.team.easybuy.service.Impl;

import com.team.easybuy.entity.News;
import com.team.easybuy.mapper.NewsMapper;
import com.team.easybuy.service.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NewsServiceImpl implements NewsService {

    @Resource
    private NewsMapper newsMapper;

    @Override
    public List<News> ListNews() {
        return newsMapper.selectNews();
    }

    @Override
    public News findById(Integer id) {
        return newsMapper.selectById(id);
    }
}
